package com.meisupic.copyright.service;

import com.meisupic.copyright.domain.bo.RCodeUpdateBo;
import com.meisupic.copyright.domain.po.CopyRightWorks;
import com.meisupic.copyright.domain.query.WorksQuery;
import com.meisupic.copyright.domain.vo.CategroyVo;
import com.meisupic.copyright.domain.vo.CopyRightWorksResponseVo;
import com.meisupic.copyright.domain.vo.CopyRightWorksRowVo;
import com.meisupic.copyright.domain.vo.CopyRightWorksVo;
import com.meisupic.copyright.domain.vo.ReturnToDciMessageVo;
import com.meisupic.copyright.domain.vo.WorksAuditVo;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * creation wuxun
 *
 * @version V1.0
 * @Description: 版权登记业务类
 * @date 2018/1/19 21:11
 */
public interface ICopyRightWorksService {

  /**
   * 保存版权登记信息.
   */
  List<CopyRightWorks> saveWorks(CopyRightWorksVo copyRightWorksVo, Long userId);

  void updateWorks(CopyRightWorks copyRightWorks);

  CopyRightWorks findById(Long id);


  /**
   * 版权登记修改时查询修改数据
   */
  CopyRightWorksResponseVo findCopyRightWorksResponseVOById(Long id, boolean reEditFlag);

  List<String> confirmWorksInfo(Long id);


  /**
   * DCI回调处理方法
   */
  ReturnToDciMessageVo receiveDciCertificate(String callbackMessage);

  List<CategroyVo> findCategoryVoList();

  Page<CopyRightWorksRowVo> findPageCopyRightWorkRowVO(WorksQuery worksQuery, Pageable pageable);

  CopyRightWorksRowVo findSingleWorksVo(Long id);

  CopyRightWorksRowVo findSingleWorksVoByGoodsId(Long goodsId);

  void deleteWorks(Long id);

  void doPass(WorksAuditVo worksAuditVo);

  void doRefuse(WorksAuditVo worksAuditVo);

  int countCommitedWorks(Long userId);

  List<CopyRightWorksRowVo> findLatestWorks(Long userid);

  void updateScore(Long id, Integer score);

  void updateScore(Long id, String keyWords);

  void updateWorksType(Long id, String worksType);

  String getGoodsSn(Long worksId);

  boolean isRepeatedWorksName(Long id, String worksName);

  boolean resetErrorCount();

  void offImage(Long id);

  void sendRcodeApply(CopyRightWorks copyRightWorks);

  void saveAndUploadCertToOss(String fileName, String base64Content);

  String updateRCodeStatus(RCodeUpdateBo rCodeUpdateBo);
}
